package com.daxia.ogmall.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.daxia.ogmall.model.BaseModel;

import javax.persistence.ManyToOne;
import com.daxia.ogmall.model.SpaceObject;
import com.daxia.ogmall.model.ProductCategory;
import javax.persistence.JoinColumn;
import com.daxia.ogmall.model.Space;

/**
 * ProductCategorySpace
 */
@Entity
@Table(name = "productcategoryspace") 
public class ProductCategorySpace extends BaseModel {
	
	public ProductCategorySpace() {
	}
	
	public ProductCategorySpace(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
    private Long id;
	/**
	 * 产品类别
	 */
	@ManyToOne
	@JoinColumn(name = "productCategory_id")
    private ProductCategory productCategory;
	/**
	 * 空间
	 */
	@ManyToOne
	@JoinColumn(name = "space_id")
    private Space space;
	/**
	 * 空间位置
	 */
	@ManyToOne
	@JoinColumn(name = "spaceObject_id")
    private SpaceObject spaceObject;
	
	public Long getId() {
    	return id;
    }
	
    public void setId(Long id) {
    	this.id = id;
    }
	
	public ProductCategory getProductCategory() {
    	return productCategory;
    }
	
    public void setProductCategory(ProductCategory productCategory) {
    	this.productCategory = productCategory;
    }
	
	public Space getSpace() {
    	return space;
    }
	
    public void setSpace(Space space) {
    	this.space = space;
    }
	
	public SpaceObject getSpaceObject() {
    	return spaceObject;
    }
	
    public void setSpaceObject(SpaceObject spaceObject) {
    	this.spaceObject = spaceObject;
    }
	
}
